
#curl -i -H "Content-Type: application/json" -X PUT -d '{"status":"compile"}' http://192.168.211.86:6666/e2e/api/v1.0/tasks/4

docker rmi -f 192.168.211.85:8088/sdvos_demo/seatctrl_e2e_bt:local
docker build -f ./app/Dockerfile --progress=plain -t 192.168.211.85:8088/sdvos_demo/seatctrl_e2e_bt:latest   .

#curl -i -H "Content-Type: application/json" -X PUT -d '{"status":"build"}' http://192.168.211.86:6666/e2e/api/v1.0/tasks/4

#docker image list | grep seatctrl_e2e_bt
#docker tag localhost:12345/seatctrl_e2e_bt:local registry.cn-hangzhou.aliyuncs.com/etas_e2e/seatadjuster:demo_poc
docker images
sudo docker login -u admin  -p Harbor12345  192.168.211.85:8088 
sudo docker push 192.168.211.85:8088/sdvos_demo/seatctrl_e2e_bt:latest

#curl -i -H "Content-Type: application/json" -X PUT -d '{"status":"test"}' http://192.168.211.86:6666/e2e/api/v1.0/tasks/4

sleep 1 
echo Restart VehicleApp on LEDA EDGE
#curl -i -H "Content-Type: application/json" -X PUT -d '{"status":"deploy"}' http://192.168.211.86:6666/e2e/api/v1.0/tasks/4
sudo ssh root@192.168.211.84 "bash -x /data/aric/update_app_img.sh"

echo 
echo #####################################################
echo #                                                   #
echo #   Redeployed sucessfully !!!                      #
echo #                                                   #
echo #####################################################

#curl -i -H "Content-Type: application/json" -X PUT -d '{"status":"complete"}' http://192.168.211.86:6666/e2e/api/v1.0/tasks/4
